package com.ex.model;
// Generated 2018-7-14 23:34:36 by Hibernate Tools 4.3.5.Final

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TTeacher generated by hbm2java
 */
@Entity
@Table(name = "t_teacher", catalog = "huaqiao")
public class TTeacher implements java.io.Serializable {

	@Override
	public String toString() {
		return "TTeacher [id=" + id + ", name=" + name + ", mobile=" + mobile + ", code=" + code + ", account="
				+ account + ", password=" + password + ", weixinId=" + weixinId + ", modifiedTime=" + modifiedTime
				+ ", modifiedBy=" + modifiedBy + "]";
	}

	private Integer id;
	private String name;
	private String mobile;
	private String code;
	private String account;
	private String password;
	private String weixinId;
	private Date modifiedTime;
	private Integer modifiedBy;
	private Set TClasses = new HashSet(0);
	private Set TOutRequests = new HashSet(0);

	public TTeacher() {
	}

	public TTeacher(String name, String mobile, String code) {
		this.name = name;
		this.mobile = mobile;
		this.code = code;
	}

	public TTeacher(String name, String mobile, String code, String account, String password, String weixinId,
			Date modifiedTime, Integer modifiedBy, Set TClasses, Set TOutRequests) {
		this.name = name;
		this.mobile = mobile;
		this.code = code;
		this.account = account;
		this.password = password;
		this.weixinId = weixinId;
		this.modifiedTime = modifiedTime;
		this.modifiedBy = modifiedBy;
		this.TClasses = TClasses;
		this.TOutRequests = TOutRequests;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "name", nullable = false, length = 100)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "mobile", nullable = false, length = 30)
	public String getMobile() {
		return this.mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	@Column(name = "code", nullable = false, length = 30)
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "account", length = 30)
	public String getAccount() {
		return this.account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	@Column(name = "password", length = 100)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "weixin_id", length = 100)
	public String getWeixinId() {
		return this.weixinId;
	}

	public void setWeixinId(String weixinId) {
		this.weixinId = weixinId;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "modified_time", length = 19)
	public Date getModifiedTime() {
		return this.modifiedTime;
	}

	public void setModifiedTime(Date modifiedTime) {
		this.modifiedTime = modifiedTime;
	}

	@Column(name = "modified_by")
	public Integer getModifiedBy() {
		return this.modifiedBy;
	}

	public void setModifiedBy(Integer modifiedBy) {
		this.modifiedBy = modifiedBy;
	}

	@OneToMany(targetEntity=TClass.class,fetch = FetchType.LAZY, mappedBy = "TTeacher")
	public Set getTClasses() {
		return this.TClasses;
	}

	public void setTClasses(Set TClasses) {
		this.TClasses = TClasses;
	}

	@OneToMany(targetEntity=TOutRequest.class,fetch = FetchType.LAZY, mappedBy = "TTeacher")
	public Set getTOutRequests() {
		return this.TOutRequests;
	}

	public void setTOutRequests(Set TOutRequests) {
		this.TOutRequests = TOutRequests;
	}

}
